<?php

namespace common\entities\myhtsq;

use common\entities\ContractEntity;
use Yii;

/**
 * This is the model class for table "myscrm_sign_achievement".
 *
 * @property string $achievement_id
 * @property string $contract_id
 * @property string $achievement_amount
 * @property string $belong_by
 * @property string $abu_by
 * @property string $department_by
 * @property string $area_by
 * @property string $manager_by
 * @property string $created_on
 * @property string $created_by
 * @property string $modified_on
 * @property string $modified_by
 * @property string $achievement_belong_time
 * @property string $erp_achievement_belong_bu
 * @property string $erp_achievement_belong
 * @property string $erp_achievement_belong_abu
 * @property string $erp_achievement_belong_abu_owner
 * @property string $erp_achievement_belong_bu_manager
 */
class SignAchievementEntity extends ContractEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_sign_achievement';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['achievement_id'], 'required'],
            [['achievement_amount'], 'number'],
            [['created_on', 'modified_on', 'achievement_belong_time'], 'safe'],
            [['attribute_name'], 'string', 'max' => 50],
            [['achievement_id', 'contract_id', 'belong_by', 'abu_by', 'department_by', 'area_by', 'manager_by', 'created_by', 'modified_by', 'erp_achievement_belong_bu', 'erp_achievement_belong', 'erp_achievement_belong_abu', 'erp_achievement_belong_abu_owner', 'erp_achievement_belong_bu_manager'], 'string', 'max' => 36]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'achievement_id' => '业绩ID',
            'contract_id' => '合同ID',
            'achievement_amount' => '签约业绩金额= 签约金额',
            'belong_by' => '业绩归属人ID',
            'abu_by' => '业绩归属ABU',
            'department_by' => '业绩归属部门',
            'area_by' => '业绩归属区域',
            'manager_by' => 'ERP客户经理',
            'created_on' => '创建时间',
            'created_by' => '创建人',
            'modified_on' => '修改时间',
            'modified_by' => '修改人',
            'achievement_belong_time' => '业绩归属时间=合同录入时间',
            'erp_achievement_belong_bu' => 'ERP客户经理所属部门',
            'erp_achievement_belong' => 'ERP业绩归属人',
            'erp_achievement_belong_abu' => 'ERP业绩归属ABU（由ERP业绩归属人带出）',
            'erp_achievement_belong_abu_owner' => 'ERP业绩归属ABU负责人',
            'erp_achievement_belong_bu_manager' => 'ERP业绩归属部门经理',
            'attribute_name' => 'Attribute Name',
        ];
    }
}
